import pygame  
from pygame.locals import *  
pygame.init()  
 
screen = pygame.display.set_mode((400, 400))  
dim = 400/8

pygame.display.set_caption('AJEDREZ')  
  

  
 
#cuad_negro_ventana = pygame.Surface(screen.get_size())  

#cuad_negro_ventana.fill((200, 200, 200))  
  
#screen.blit(cuad_negro_ventana, (0, 0))
  
# Actualiza el contenido de la pantalla  
pygame.display.flip()  
  
#Colores utilizados  
black_color = (0, 0, 0)  
white_color = (255, 255, 255)
  
flag = True

while flag:
    par = 1
    for i in range(8):
        for j in range(8):

            if (par % 2) == 0:
                color = black_color
            else:
                color = white_color

            pygame.draw.rect(screen, color, (i*dim, j*dim,   dim,   dim))
            par += 1
        par += 1
        
    pygame.draw.circle(screen,(192,192,192),(25,20),15,0)    
    pygame.display.flip()


    eventos = pygame.event.get()  
    if len(eventos) > 0:  
        if eventos[0].type == QUIT: flag = False



pygame.display.update()
